﻿//SciChartTradeAnnotationBase.cs
//Copyright (c) 2013 StockSharp LLC, all rights reserved.
//This code module is part of StockSharp library.
//This code is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.
//See the file License.txt for the license details.
//More info on: http://stocksharp.com

namespace StockSharp.Xaml
{
	using System;

	using Abt.Controls.SciChart;

	using Ecng.Common;

	using StockSharp.BusinessEntities;

	class SciChartTradeAnnotationBase : CustomAnnotation
	{
		private readonly MyTrade _trade;

		public SciChartTradeAnnotationBase(MyTrade trade)
		{
			if (trade == null)
				throw new ArgumentException("trade");

			_trade = trade;
		}

		public string BuySell
		{
			get { return _trade.Trade.OrderDirection.To<string>(); }
		}

		public string TradeVolume
		{
			get { return _trade.Trade.Volume.To<string>(); }
		}

		public string TradePrice
		{
			get { return _trade.Trade.Price.To<string>(); }
		}
	}
}